<?
//Variable
$TD[0]="CLASS=\"td1\"";
$TD[1]="CLASS=\"td2\"";
$TD[2]="CLASS=\"td3\"";

SWITCH ($tri){
    CASE 1:
            $QUERY_TRI="AND journal_style=0";
    BREAK;
    CASE 2:
            $QUERY_TRI="AND journal_style=1";
    BREAK;
    DEFAULT:
             $QUERY_TRI=NULL;
    BREAK;

}//Fin de SWITCH ($tri){

$VAR_TEXT="<table CLASS=\"TD1\" width=\"100%\" height=\"100%\" valign=\"top\"  border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
  <tr><td valign=\"top\">";
  
  
  
$query="SELECT journal_date, journal_text, journal_sorte, journal_sorte_id FROM sd_journal WHERE journal_user=$_PERSO_ID $QUERY_TRI ORDER BY journal_date DESC";
$resultat=mysql_query($query);

$VAR_TEXT.="</BR><CENTER><table width=\"99%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#000000\">
  <tr>
    <td><table width=\"100%\" border=\"0\" cellspacing=\"1\">";
    

    $var_tmp=0;
WHILE ($tmp=mysql_fetch_array($resultat)){
SWITCH ($var_tmp){
       CASE 1:
            $bgr=$TD[1];
            $var_tmp=0;
            BREAK;
       DEFAULT :
            $bgr=$TD[2];
            $var_tmp=1;
            BREAK;
}//Fin du switch.

 $VAR_TEXT.="<tr>
  <td $bgr>&nbsp;</td>
    <td $bgr><font CLASS=\"text_j_noir\">$tmp[0];</font></td>
    <td $bgr><font CLASS=\"text_j_noir\">$tmp[1];</font></td>

  </tr>";
}
  
$VAR_TEXT.="</table></td></tr></table></CENTER></td></tr></table>";

echo $VAR_TEXT;

       /*    <td CLASS=\"TDF_HG\">&nbsp;</td>
    <td CLASS=\"TDF_HH\">&nbsp;</td>
    <td CLASS=\"TDF_HD\">&nbsp;</td>
  </tr>
  <tr>
    <td CLASS=\"TDF_GG\">&nbsp;</td>
    <td CLASS=\"TD3\">$TMP_TEXT</td>
    <td CLASS=\"TDF_DD\">&nbsp;</td>
  </tr>
  <tr>
    <td CLASS=\"TDF_BG\">&nbsp;</td>
    <td CLASS=\"TDF_BB\">&nbsp;</td>
    <td CLASS=\"TDF_BD\">&nbsp;</td>*/

?>
